package com.xsz.oa.controller.sys;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.xsz.oa.service.UserService;

@Controller
@RequestMapping("/user")
public class UserController {

	@Autowired
	private UserService userService;

	@RequiresPermissions("user:view")
	@RequestMapping("/list")
	public String list(Model model) {

		model.addAttribute("userList", userService.findAll());

		return "user/list";
	}
}
